﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="GestioneUtentiMagazzino.aspx.cs" Inherits="FimetContoDeposito.Operazioni.GestioneUtentiMagazzino" %>

<%@ Register assembly="GrayParrot.Web.Controls" namespace="GrayParrot.Web.Controls" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <asp:PlaceHolder ID="PlaceHolder1" runat="server">        
        <%: Scripts.Render("~/bundles/JQuery") %>          
        <%: Scripts.Render("~/bundles/JQueryUI") %>  
        <%: Styles.Render("~/bundles/Formly/css") %>
        <%: Scripts.Render("~/bundles/Formly") %>
    </asp:PlaceHolder>

    <!-- Common -->
    <script type="text/javascript" lang="javascript" src="../Scripts/Formly/FormlyHelper.js"></script>
    <script type="text/javascript" lang="javascript" src="../Scripts/GrayParrot.Core.js"></script> 
    <script type="text/javascript" lang="javascript" src="../Scripts/GrayParrot.AngularJS.Directives.Fileupload.js"></script> 
    <script type="text/javascript" lang="javascript" src="../Scripts/GrayParrot.AngularJS.Directives.DateTimePicker.js"></script> 
    <script type="text/javascript" lang="javascript" src="../Scripts/GrayParrot.AngularJS.js"></script> 
    <script type="text/javascript" lang="javascript" src="../Scripts/GrayParrot.Modals.js"></script> 
    <!-- Common -->

    <style>
        body {
         margin: 20px
        }

        .formly-field {
            margin-bottom: 0px !important; 
        }

        .formly.row{
            display:block;
            margin-right:10px;
            margin-left:10px;
        }

        .formly-field.section-label {
            margin-bottom: 0px
        }

        .btn-file {
            position: relative;
            overflow: hidden;
        }
        .btn-file input[type=file] {
            position: absolute;
            top: 0;
            right: 0;
            min-width: 100%;
            min-height: 100%;
            font-size: 100px;
            text-align: right;
            filter: alpha(opacity=0);
            opacity: 0;
            outline: none;
            background: white;
            cursor: inherit;
            display: block;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <!-- 
        Sitemap Menu item:
        <siteMapNode url="~/GestioneUtentiMagazzino.aspx" title="GestioneUtentiMagazzino" description="GestioneUtentiMagazzino" image="fa-laptop" id="GestioneUtentiMagazzino"/>
    -->
    <section class="panel">
	    <header class="panel-heading">
			<b>Gestione Utenti Magazzino</b>
		</header>

		<div class="panel-body">

            <!-- PUT YOUR CONTENT HERE -->
            <div class="row" ng-app="formlyExample" ng-controller="MainCtrl as vm" name="divContainer" id="divContainer">
                <div ng-if="vm.loadingData.$$state.status === 0" style="margin:20px 0;font-size:2em">
                    <strong>Caricamento...</strong>
                </div>
                <div ng-if="vm.loadingData.$$status.state !== 0">
                    <form ng-submit="vm.onSubmit()" novalidate id="formlyForm">
                        <formly-form model="vm.model" fields="vm.fields" form="vm.form">
                            <button type="sumbit" class="btn btn-primary submit-button" ng-disabled="vm.form.$invalid">Aggiungi</button>
                        </formly-form>
                    </form>
                </div>
            </div>
		</div>
	</section>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="LocaJavascript" runat="server">
<script type="text/javascript">

    var settings = new FormlySettings();
    settings.container = '#divContainer';
    settings.setLoad(settings.createGetConfig('/api/Utenti/LoadFields'));
    settings.setSend(settings.createPostConfig('/api/Utenti/SalvaConfigurazione'));
    FormlyManager(settings);

</script>
</asp:Content>